<script setup lang="ts">
import TheWelcome from '../components/TheWelcome.vue'
let arr = [ 1, 2, 3, 4, 5, 6 ]; 
console.log( arr.some((item,index)=>{
    return item > 5
}))   // true 

console.log( arr.every((item,index)=>{
    return item > 5
}))   // false 

//判断是否是中文
function isChinese(arr:Array<string>):boolean{
    let result=[]
    for(var i=0;i<arr.length;i++){
        var reg=/[\u4e00-\u9fa5]+/ug;
        result.push(reg.test(arr[i]))
    }
    console.log(result);
    return result.every(v=>v)
    
}
let arr1=["石家庄","sss","广州","吉林","武汉","秦皇岛"];
console.log(isChinese(arr1));

</script>

<template>
  <main>
    <TheWelcome />
  </main>
</template>
